﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Coder.IdeOne;

namespace Coder.Framework
{
    /// <summary>
    /// Represents a Project that is in-progress or saved. 
    /// Can be serialized and deserialized.
    /// </summary>
    public class Project
    {
        public Challenge Challenge { get; set; }
        public string Code { get; set; }
        public  Language Language { get; set; }

        /// <summary>
        /// Creates a new Project from a challenge and languageID.
        /// </summary>
        /// <param name="challenge"></param>
        /// <param name="languageID"></param>
        public Project(Challenge challenge, int languageID)
        {
            Language = Language.RetrieveLanguage(languageID);
            Code = Language.Template;
            Challenge = challenge;
        }

    }
}
